cmake_minimum_required (VERSION 3.5)

project (qtapp)

file(GLOB_RECURSE SRC_DIR "./*.cpp")

find_package(Qt6 COMPONENTS Core Widgets Gui REQUIRED)
 
link_directories("../core")

set(CMAKE_AUTOMOC ON)

add_executable(${PROJECT_NAME} ${SRC_DIR})

target_link_libraries(${PROJECT_NAME} PRIVATE 
		core
        Qt6::Core
        Qt6::Gui
        Qt6::Widgets
        )

target_link_libraries(${PROJECT_NAME} PRIVATE spdlog fmt $<$<BOOL:${MINGW}>:ws2_32>)

install(TARGETS ${PROJECT_NAME} DESTINATION ${INSTALL_DIR})